package com.burges.net.dataSet.api.transform

import org.apache.flink.api.scala.{DataSet, ExecutionEnvironment}

/**
  * 创建人    BurgessLee 
  * 创建时间   2020/2/11 
  * 描述     coGroup算子代码示例
  */
object CogroupDemo {

	def main(args: Array[String]): Unit = {
		var environment: ExecutionEnvironment = ExecutionEnvironment.getExecutionEnvironment
		val caseClassPersonDs1: DataSet[Person] = environment.fromElements(Person(1, "a"), Person(1, "a"))
		val caseClassPersonDs2: DataSet[(Double, Int)] = environment.fromElements((12.3, 1), (22.3, 3))
		caseClassPersonDs1.coGroup(caseClassPersonDs2).where("id").equalTo(1)
	}

}
